package cm.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "调度任务列表", description = "导出")
public class XxlJobInfoExportDTO implements Serializable {
    private static final long serialVersionUID = 937640013245572575L;

    @ApiModelProperty(value = "服务名称")
    @ColumnWidth(25)
    @ExcelProperty("服务名称")
    private String serviceName;

    @ApiModelProperty(value = "执行时间")
    @ColumnWidth(12)
    @ExcelProperty("执行时间")
    private String executeTime;

    @ApiModelProperty(value = "任务Id")
    @ExcelProperty("任务Id")
    private Integer id;

    @ApiModelProperty(value = "执行器任务handler")
    @ColumnWidth(35)
    @ExcelProperty("执行器任务handler")
    private String executorHandler;

    @ApiModelProperty(value = "作者", example = "作者1")
    @ColumnWidth(10)
    @ExcelProperty("负责人")
    private String author;
    
    @ApiModelProperty(value = "任务描述")
    @ColumnWidth(50)
    @ExcelProperty("任务描述")
    private String jobDesc;

    @NotBlank(message = "请填写调度配置，值含义取决于调度类型")
    @ApiModelProperty(value = "调度配置", example = "调度配置，值含义取决于调度类型1")
    @ColumnWidth(20)
    @ExcelProperty("调度配置")
    private String scheduleConf;

    @NotBlank(message = "请填写调度过期策略")
    @ApiModelProperty(value = "调度过期策略", example = "调度过期策略1")
    @ColumnWidth(20)
    @ExcelProperty("调度过期策略")
    private String misfireStrategy;

    @NotBlank(message = "请填写执行器路由策略")
    @ApiModelProperty(value = "执行器路由策略", example = "执行器路由策略1")
    @ColumnWidth(20)
    @ExcelProperty("执行器路由策略")
    private String executorRouteStrategy;

    @NotBlank(message = "请填写阻塞处理策略")
    @ApiModelProperty(value = "阻塞处理策略", example = "阻塞处理策略1")
    @ColumnWidth(25)
    @ExcelProperty("阻塞处理策略")
    private String executorBlockStrategy;

}
